import requests from '@/utils/request-proxy'

//添加轮播图数据
export const reqAddArticle = (data) => requests({ url: `/article/add`, method: 'post', data })

//分页获取轮播图数据
export const reqGetArticleByPage = (currentPage, size) => requests({ url: `/article/page/${currentPage}/${size}`, method: 'get' })

//主题查询
export const reqGetByTitle = (title) => requests({ url: `/article/${title}`, method: 'get' })

//主题查询(分页)
export const reqGetPageByTitle = (currentPage, size, topic) => requests({ url: `/image/page/${currentPage}/${size}/${topic}`, method: 'get' })

//主题查询
export const reqsetUsing = (id) => requests({ url: `/article/update/${id}`, method: 'put' })

//修改轮播图
export const reqUpdateArticle = (data) => requests({ url: `/article`, method: 'put', data })

//根据id删除文章记录
export const reqDeleteArticle = (id) => requests({ url: `/article/${id}`, method: 'delete' })